﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;

namespace Laugh.Example.Domain.Mapping
{
    public class PersonMapping : ClassMapping<Person>
    {
        public PersonMapping()
        {
            Id(p => p.Id, m => m.Generator(Generators.Identity));

            Property(p => p.Name, m => m.Length(10));
            Property(p => p.IdentityNo, m => m.Length(18));
            Property(p => p.TelePhone, m => m.Length(16));
            Property(p => p.Age, m => m.Length(3));

            Table("ZZH_PERSON");
        }
    }
}